//package com.wemirr.platform.gateway.config;
//
//import com.wemirr.platform.gateway.handler.HystrixFallbackHandler;
//import com.wemirr.platform.gateway.handler.SwaggerResourceHandler;
//import com.wemirr.platform.gateway.handler.SwaggerSecurityHandler;
//import com.wemirr.platform.gateway.handler.SwaggerUiHandler;
//import lombok.AllArgsConstructor;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.http.MediaType;
//import org.springframework.web.reactive.function.server.RequestPredicates;
//import org.springframework.web.reactive.function.server.RouterFunction;
//import org.springframework.web.reactive.function.server.RouterFunctions;
//
///**
// * @author Levin
// * @since 2019-04-04
// * 路由配置信息
// */
//@Slf4j
//@Configuration
//@AllArgsConstructor
//public class RouterFunctionConfiguration {
//    private final HystrixFallbackHandler hystrixFallbackHandler;
//    private final SwaggerResourceHandler swaggerResourceHandler;
//    private final SwaggerSecurityHandler swaggerSecurityHandler;
//    private final SwaggerUiHandler swaggerUiHandler;
//
//    @Bean
//    public RouterFunction routerFunction() {
//        return RouterFunctions.route(
//                RequestPredicates.path("/fallback")
//                        .and(RequestPredicates.accept(MediaType.APPLICATION_JSON)), hystrixFallbackHandler)
//                .andRoute(RequestPredicates.GET("/swagger-resources")
//                        .and(RequestPredicates.accept(MediaType.ALL)), swaggerResourceHandler)
//                .andRoute(RequestPredicates.GET("/swagger-resources/configuration/ui")
//                        .and(RequestPredicates.accept(MediaType.ALL)), swaggerUiHandler)
//                .andRoute(RequestPredicates.GET("/swagger-resources/configuration/security")
//                        .and(RequestPredicates.accept(MediaType.ALL)), swaggerSecurityHandler);
//
//    }
//
//}
